
; Regla que recomienda el modelo dm1-1110ss si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule dm1-1110ss
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 32)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Pentium SU4100")))
	(test (or (eq ?v1 0.0)(<= ?v1 1.3)))
	(test (or (eq ?v2 0.0)(>= ?v2 1.3)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 3)))
	(test (or (eq ?mem2 0)(>= ?mem2 3)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 320)))
	(test (or (eq ?tam2 0)(>= ?tam2 320)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "HD")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 11.6)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 11.6)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "Intel")))
	(test (or (eq ?graf "n")(eq ?graf "Accelerator 4500MHD")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "No")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 6)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 1.46)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 1.46)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 499)))
	(test (or (eq ?p2 0.0)(>= ?p2 499)))
	=>
	(assert (modelo_aconsejado (modelo Pavilion:dm1-1110ss)))
)

; Regla que recomienda el modelo dm3-1170es si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule dm3-1170es
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Pentium SU4100")))
	(test (or (eq ?v1 0.0)(<= ?v1 1.3)))
	(test (or (eq ?v2 0.0)(>= ?v2 1.3)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 4)))
	(test (or (eq ?mem2 0)(>= ?mem2 4)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 320)))
	(test (or (eq ?tam2 0)(>= ?tam2 320)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 13.3)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 13.3)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "Intel")))
	(test (or (eq ?graf "n")(eq ?graf "Accelerator 4500MHD")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "No")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 6)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 1.91)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 1.91)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 699)))
	(test (or (eq ?p2 0.0)(>= ?p2 699)))
	=>
	(assert (modelo_aconsejado (modelo Pavilion:dm3-1170es)))
)

; Regla que recomienda el modelo dv7-3090es si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule dv7-3090es
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Core i7-720QM")))
	(test (or (eq ?v1 0.0)(<= ?v1 1.6)))
	(test (or (eq ?v2 0.0)(>= ?v2 1.6)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 4)))
	(test (or (eq ?mem2 0)(>= ?mem2 4)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 640)))
	(test (or (eq ?tam2 0)(>= ?tam2 640)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 17.3)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 17.3)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "NVIDIA")))
	(test (or (eq ?graf "n")(eq ?graf "GeForce GT 230M")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "Si")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 8)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 3.52)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 3.52)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 1295)))
	(test (or (eq ?p2 0.0)(>= ?p2 1295)))
	=>
	(assert (modelo_aconsejado (modelo Pavilion:dv7-3090es)))
)

; Regla que recomienda el modelo dv6-2020es si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule dv6-2020es
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "AMD")))
	(test (or (eq "n" ?mod)(eq ?mod "Athlon II Dual Core")))
	(test (or (eq ?v1 0.0)(<= ?v1 2.0)))
	(test (or (eq ?v2 0.0)(>= ?v2 2.0)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 4)))
	(test (or (eq ?mem2 0)(>= ?mem2 4)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 500)))
	(test (or (eq ?tam2 0)(>= ?tam2 500)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 15.6)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 15.6)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf ATI)))
	(test (or (eq ?graf "n")(eq ?graf "Radeon HD 4530")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "No")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 6)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 2.88)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 2.88)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 595)))
	(test (or (eq ?p2 0.0)(>= ?p2 595)))
	=>
	(assert (modelo_aconsejado (modelo Pavilion:dv6-2020es)))
)

; Regla que recomienda el modelo dv8-1100 si se cumplen todos sus
; requisitos (consultar lista de modelos).

(defrule dv8-1100
	(sistema (nombre ?nombreSO)(version ?version)(bits ?bits))
	(test (or (eq ?nombreSO "n")(eq ?nombreSO "Windows")))
	(test (or (eq "n" ?version)(eq ?version "7")))	
	(test (or (eq 0 ?bits)(eq ?bits 64)))
	(procesador (fabricante ?fab)(modelo ?mod)(velocidad_min ?v1)(velocidad_max ?v2))
	(test (or (eq "n" ?fab)(eq ?fab "Intel")))
	(test (or (eq "n" ?mod)(eq ?mod "Core i7-720QM")))
	(test (or (eq ?v1 0.0)(<= ?v1 1.6)))
	(test (or (eq ?v2 0.0)(>= ?v2 1.6)))
	(memoria (actual_min ?mem1)(actual_max ?mem2))
	(test (or (eq ?mem1 0)(<= ?mem1 6)))
	(test (or (eq ?mem2 0)(>= ?mem2 6)))
	(disco (tam_min ?tam1)(tam_max ?tam2))
	(test (or (eq ?tam1 0)(<= ?tam1 1024)))
	(test (or (eq ?tam2 0)(>= ?tam2 1024)))	
	(pantalla (modelo ?modPan)(tam_min ?pan1)(tam_max ?pan2))
	(test (or (eq ?modPan "n")(eq ?modPan "LED")))
	(test (or (eq ?pan1 0.0)(<= ?pan1 18.4)))
	(test (or (eq ?pan2 0.0)(>= ?pan2 18.4)))
	(grafica (fabricante ?fabGraf)(modelo ?graf))
	(test (or (eq ?fabGraf "n")(eq ?fabGraf "NVIDIA")))
	(test (or (eq ?graf "n")(eq ?graf "GeForce GT 230M")))
	(conexiones (wifi ?wifi)(blue ?blue))
	(test (or (eq ?wifi "n")(eq ?wifi "Si")))
	(test (or (eq ?blue "n")(eq ?blue "Si")))
	(otros (celdas ?celdas)(peso_min ?pMin)(peso_max ?pMax))
	(test (or (eq ?celdas 0)(eq ?celdas 4)))	
	(test (or (eq ?pMin 0.0)(<= ?pMin 3.98)))
	(test (or (eq ?pMax 0.0)(>= ?pMax 3.98)))
	(precio (cantidad_min ?p1))
	(precio (cantidad_max ?p2))
	(test (or (eq ?p1 0.0)(<= ?p1 1695)))
	(test (or (eq ?p2 0.0)(>= ?p2 1695)))
	=>
	(assert (modelo_aconsejado (modelo Pavilion:dv8-1100)))
)

